package com.dongnam.quanly.common.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import com.dongnam.quanly.common.model.enumtype.LoaiDonHang;
import com.dongnam.quanly.common.model.enumtype.PhuongTienVanChuyen;
import com.dongnam.quanly.common.model.enumtype.TrangThaiDonHang;

@Entity
@Table(name = "DonHang")
public class DonHang extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "SoChungTu", length = 30)
	private String soChungTu;

	@Column(name = "NgayLap")
	private Date ngayLap;

	@Column(name = "NguoiLap")
	private String nguoiLap;

	@Column(name = "ThoiHanMua")
	private Date thoiHanMua;

	@Column(name = "PhuongTienVanChuyen", length = 30)
	@Enumerated(EnumType.STRING)
	private PhuongTienVanChuyen phuongTienVanChuyen;

	@Column(name = "NguoiGiaoHang", length = 100)
	private String nguoiGiaoHang;

	@Column(name = "SoDTNguoiGiaoHang", length = 30)
	private String soDTNguoiGiaoHang;

	@Column(name = "DoiTac")
	private String doiTac;

	@Column(name = "CaNhan", length = 100)
	private String caNhan;

	@Column(name = "NhanVienNhan")
	private String nhanVienNhan;

	@Column(name = "KhoNhanHang")
	private String khoNhanHang;

	@Column(name = "KhoXuatHang")
	private String khoXuatHang;

	@Column(name = "LoaiDonHang", length = 30)
	@Enumerated(EnumType.STRING)
	private LoaiDonHang loaiDonHang;

	@Column(name = "TrangThai", length = 30)
	@Enumerated(EnumType.STRING)
	private TrangThaiDonHang trangThai;

	@Column(name = "HoaHong")
	private Double hoaHong;

	public DonHang() {
	}

	public DonHang(DonHang donhang) {
		super();
		this.soChungTu = donhang.soChungTu;
		this.ngayLap = donhang.ngayLap;
		this.nguoiLap = donhang.nguoiLap;
		this.thoiHanMua = donhang.thoiHanMua;
		this.phuongTienVanChuyen = donhang.phuongTienVanChuyen;
		this.nguoiGiaoHang = donhang.nguoiGiaoHang;
		this.soDTNguoiGiaoHang = donhang.soDTNguoiGiaoHang;
		this.doiTac = donhang.doiTac;
		this.caNhan = donhang.caNhan;
		this.nhanVienNhan = donhang.nhanVienNhan;
		this.khoNhanHang = donhang.khoNhanHang;
		this.khoXuatHang = donhang.khoXuatHang;
		this.loaiDonHang = donhang.loaiDonHang;
		this.trangThai = donhang.trangThai;
		this.hoaHong = donhang.hoaHong;
	}

	public String getSoChungTu() {
		return soChungTu;
	}

	public void setSoChungTu(String soChungTu) {
		this.soChungTu = soChungTu;
	}

	public Date getNgayLap() {
		return ngayLap;
	}

	public void setNgayLap(Date ngayLap) {
		this.ngayLap = ngayLap;
	}

	public Date getThoiHanMua() {
		return thoiHanMua;
	}

	public void setThoiHanMua(Date thoiHanMua) {
		this.thoiHanMua = thoiHanMua;
	}

	public PhuongTienVanChuyen getPhuongTienVanChuyen() {
		return phuongTienVanChuyen;
	}

	public void setPhuongTienVanChuyen(PhuongTienVanChuyen phuongTienVanChuyen) {
		this.phuongTienVanChuyen = phuongTienVanChuyen;
	}

	public String getNguoiGiaoHang() {
		return nguoiGiaoHang;
	}

	public void setNguoiGiaoHang(String nguoiGiaoHang) {
		this.nguoiGiaoHang = nguoiGiaoHang;
	}

	public String getSoDTNguoiGiaoHang() {
		return soDTNguoiGiaoHang;
	}

	public void setSoDTNguoiGiaoHang(String soDTNguoiGiaoHang) {
		this.soDTNguoiGiaoHang = soDTNguoiGiaoHang;
	}

	public String getCaNhan() {
		return caNhan;
	}

	public void setCaNhan(String caNhan) {
		this.caNhan = caNhan;
	}

	public String getNguoiLap() {
		return nguoiLap;
	}

	public void setNguoiLap(String nguoiLap) {
		this.nguoiLap = nguoiLap;
	}

	public String getDoiTac() {
		return doiTac;
	}

	public void setDoiTac(String doiTac) {
		this.doiTac = doiTac;
	}

	public String getNhanVienNhan() {
		return nhanVienNhan;
	}

	public void setNhanVienNhan(String nhanVienNhan) {
		this.nhanVienNhan = nhanVienNhan;
	}

	public String getKhoNhanHang() {
		return khoNhanHang;
	}

	public void setKhoNhanHang(String khoNhanHang) {
		this.khoNhanHang = khoNhanHang;
	}

	public String getKhoXuatHang() {
		return khoXuatHang;
	}

	public void setKhoXuatHang(String khoXuatHang) {
		this.khoXuatHang = khoXuatHang;
	}

	public LoaiDonHang getLoaiDonHang() {
		return loaiDonHang;
	}

	public void setLoaiDonHang(LoaiDonHang loaiDonHang) {
		this.loaiDonHang = loaiDonHang;
	}

	public TrangThaiDonHang getTrangThai() {
		return trangThai;
	}

	public void setTrangThai(TrangThaiDonHang trangThai) {
		this.trangThai = trangThai;
	}

	public Double getHoaHong() {
		return hoaHong;
	}

	public void setHoaHong(Double hoaHong) {
		this.hoaHong = hoaHong;
	}

}
